#include<bits/stdc++.h>
using namespace std;
int main(){
	string n;
	cin >> n;
	string s0[5] =  {".....",	
	                 ".***.",
	                 ".***.",
	                 ".***.",
	                 "....." };
	string s1[5] =  {"****.",	
	                 "****.",
	                 "****.",
	                 "****.",
	                 "****." };
	string s2[5] =  {".....",	
	                 "****.",
	                 ".....",
	                 ".****",
	                 "....." };
	string s3[5] =  {".....",	
	                 "****.",
	                 ".....",
	                 "****.",
	                 "....." };
	for(int j = 0 ; j < 5 ; j++){
		for(int i = 0 ; i < n.length() ; i++){
			if(n[i] == '0'){
				cout << s0[j];
			} else if(n[i] == '1') {
				cout << s1[j];
			} else if (n[i] == '2') {
				cout << s2[j];
			} else if (n[i] == '3') {
				cout << s3[j];
			}
		}
		cout << endl;
	}
	return 0;
}
